package cn.felord.wepay.spring.boot.autoconfigure;

import org.springframework.boot.context.properties.ConfigurationProperties;

import static cn.felord.wepay.spring.boot.autoconfigure.WePayProperties.WEPAY_PREFIX;

/**
 * Created with IntelliJ IDEA.
 *
 * @author Dax
 * @version v1.0.0
 * @since 2017 /9/4  17:36
 */
@ConfigurationProperties(prefix = WEPAY_PREFIX)
public class WePayProperties   {
    /**
     * The constant WEPAY_PREFIX.
     */
    public static final String WEPAY_PREFIX = "wePay";

    // 微信开放平台审核通过的应用 appid 必传

    private String appId;
    // 私钥  签名算法使用 必传
    private String secretKey;
    // 微信支付分配的商户号 必传
    private String mchId;
    // 完整的通知地址  必传
    private String notifyUrl;
    // 签名算法 默认MD5
    private String signType="MD5";
    // 证书路径
    private String certPath;
    // 开发模式开关
    private String devMode="false";

    private String decryptableClassName;




    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    public String getSecretKey() {
        return secretKey;
    }

    public void setSecretKey(String secretKey) {
        this.secretKey = secretKey;
    }

    public String getMchId() {
        return mchId;
    }

    public void setMchId(String mchId) {
        this.mchId = mchId;
    }

    public String getNotifyUrl() {
        return notifyUrl;
    }

    public void setNotifyUrl(String notifyUrl) {
        this.notifyUrl = notifyUrl;
    }

    public String getSignType() {
        return signType;
    }

    public void setSignType(String signType) {
        this.signType = signType;
    }

    public String getCertPath() {
        return certPath;
    }

    public void setCertPath(String certPath) {
        this.certPath = certPath;
    }

    public String getDevMode() {
        return devMode;
    }

    public void setDevMode(String devMode) {
        this.devMode = devMode;
    }

    public String getDecryptableClassName() {
        return decryptableClassName;
    }

    public void setDecryptableClassName(String decryptableClassName) {
        this.decryptableClassName = decryptableClassName;
    }

    @Override
    public String toString() {
        return "{" +
                "appid:" + appId +
                ", secretKey:" + secretKey +
                ", mch_id:" + mchId +
                ", notify_url:" + notifyUrl +
                ", sign_type:" + signType +
                ", certPath:" + certPath +
                ", devMode:" + devMode +
                '}';
    }
}
